﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SettingEdit.ascx.cs" Inherits="Controls_SettingEdit" %>
<div class="box">
    <!-- box / title -->
    <div class="title">
        <h5>
            Chỉnh sửa cấu hình
        </h5>
        <div class="search">
            <div class="input">
            </div>
            <div class="button">
            </div>
        </div>
    </div>
    <!-- end box / title -->
    <div id="divMessage" runat="server" />
    <div class="form">
        <div class="fields">
            <div class="field field-first">
                <div class="label">
                    <label for="input-small">
                        Chọn nhóm cấu hình:</label>
                </div>
                <div class="input">
                    <asp:DropDownList ID="ddlGroup" runat="server" />
                    <div id="divDdlGroup" class="note" runat="server">
                    </div>
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-small">
                        Key:</label>
                </div>
                <div class="input">
                    <asp:TextBox ID="txtKey" runat="server" Width="180px" CssClass="required" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-small">
                        Tên cấu hình:</label>
                </div>
                <div class="input">
                    <asp:TextBox ID="txtName" runat="server" Width="180px" CssClass="required" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-small">
                        Mô tả:</label>
                </div>
                <div class="input">
                    <asp:TextBox ID="txtDescription" runat="server" Width="180px" CssClass="description" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-small">
                        Giá trị:</label>
                </div>
                <div class="input">
                    <asp:TextBox ID="txtValue" runat="server" Width="180px" CssClass="required" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-small">
                        Chọn loại cấu hình:</label>
                </div>
                <div class="input">
                    <asp:DropDownList ID="ddlType" runat="server">
                        <asp:ListItem Text="Text" Value="0" />
                        <asp:ListItem Text="TextBox" Value="1" />
                        <asp:ListItem Text="RadioButton" Value="2" />
                        <asp:ListItem Text="DropDownList" Value="3" />
                        <asp:ListItem Text="CheckBox" Value="4" />
                    </asp:DropDownList>
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-small">
                        Giá trị để lựa chọn:</label>
                </div>
                <div class="input">
                    <asp:TextBox ID="txtTypeValue" runat="server" Width="180px" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-small">
                        Thứ tự hiển thị:</label>
                </div>
                <div class="input">
                    <asp:TextBox ID="txtSortDisplay" runat="server" Width="180px" CssClass="number" Text="1" />
                </div>
            </div>
            <div class="buttons">
                <asp:Button ID="btnAdd" runat="server" Text="Làm lại" Width="100px" OnClick="btnAdd_Click" />
                <asp:Button ID="btnSubmit" runat="server" Text="Cập nhật" Width="100px" OnClick="btnSubmit_Click" />
            </div>
        </div>
    </div>
       <div style="text-align: center; margin: 10px">
            <%if (Session["url"] != null)
              {
                  if (Request.UrlReferrer != null)
                  {
                      if (!Request.UrlReferrer.ToString().Equals(Request.Url.ToString()))
                      {
                          Session["url"] = Request.UrlReferrer.ToString();                      
                  
            %>
            <a onclick="history.go(-1);" title="Trang trước">
                <%
}
                      else
                      {
                %>
                <a href='<%=Session["url"].ToString() %>' title="Trang trước">
                    <%   
}
                  }
                  else
                  {                      
                    %>
                    <a onclick="history.go(-1);" title="Trang trước">
                        <%}
              }
              else
              {
                  if (Request.UrlReferrer != null)
                      Session.Add("url", Request.UrlReferrer.ToString());
                  else
                      Session.Add("url", Request.Url.ToString());
                        %>
                        <a href="default.aspx" title="Trang trước">
                            <%} %>
                            <img src="../resources/images/icons/16x16/arrow-return.png" alt="Trang trước" /></a>
                        &nbsp;&nbsp; <a href="default.aspx" title="Trang chủ">
                            <img src="../resources/images/icons/16x16/home.png" alt="Trang chủ" /></a>
        </div>
</div>
